// 设计师路由配置
import DesignerLayout from '@/views/designer/layout/DesignerLayout.vue'

// 设计师视图组件
const DesignerDashboard = () => import('@/views/designer/Dashboard.vue')
const DesignerLogin = () => import('@/views/designer/Login.vue')

// 任务管理
const TaskInfo = () => import('@/views/designer/task/TaskInfo.vue')
const TaskSchedule = () => import('@/views/designer/task/TaskSchedule.vue')

// 订单数据管理
const OrderDataUpload = () => import('@/views/designer/order/OrderDataUpload.vue')

// 个人中心
const AccountSettings = () => import('@/views/designer/profile/AccountSettings.vue')
const DesignerProfile = () => import('@/views/designer/profile/DesignerProfile.vue')
const ServiceFeedback = () => import('@/views/designer/profile/ServiceFeedback.vue')

// 设计师路由
const designerRoutes = [
  {
    path: '/designer/login',
    name: 'DesignerLogin',
    component: DesignerLogin,
    meta: { title: '设计师登录', requiresAuth: false }
  },
  {
    path: '/designer',
    component: DesignerLayout,
    redirect: '/designer/dashboard',
    meta: { requiresAuth: true, roles: ['designer'] },
    children: [
      {
        path: 'dashboard',
        name: 'DesignerDashboard',
        component: DesignerDashboard,
        meta: { title: '设计师仪表盘', icon: 'Dashboard' }
      },
       // 任务管理
       {
        path: 'task',
        name: 'TaskManagement',
        redirect: '/designer/task/info',
        meta: { title: '任务管理', icon: 'TaskList' },
        children: [
          {
            path: 'info',
            name: 'TaskInfo',
            component: TaskInfo,
            meta: { title: '任务信息' }
          },
          {
            path: 'schedule',
            name: 'TaskSchedule',
            component: TaskSchedule,
            meta: { title: '日程安排' }
          }
        ]
      },
      // 订单数据管理
      {
        path: 'order-data',
        name: 'OrderDataManagement',
        component: OrderDataUpload,
        meta: { title: '订单数据管理', icon: 'Upload' }
      },
      // 个人中心
      {
        path: 'profile',
        name: 'DesignerCenter',
        redirect: '/designer/profile/account',
        meta: { title: '个人中心', icon: 'User' },
        children: [
          {
            path: 'account',
            name: 'AccountSettings',
            component: AccountSettings,
            meta: { title: '账号与密码' }
          },
          {
            path: 'info',
            name: 'DesignerProfile',
            component: DesignerProfile,
            meta: { title: '个人信息管理' }
          },
          {
            path: 'feedback',
            name: 'ServiceFeedback',
            component: ServiceFeedback,
            meta: { title: '服务反馈' }
          }
        ]
      }
    ]
  }
]

export default designerRoutes 